package com.starlink.model.util;

import com.starlink.model.dtomapper.FreeCarryModeDtoMapper;
import com.starlink.model.domain.FreeCarryModeDO;
import com.starlink.model.vo.FreeCarryModeVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class FreeCarryModeConvert {

    public static List<FreeCarryModeVO> buildFreeCarryModeVoList(List<FreeCarryModeDO> freeCarryModeDOList) {
        if (CollectionUtils.isEmpty(freeCarryModeDOList)) {
            return Lists.newArrayList();
        }
        List<FreeCarryModeVO> freeCarryModeVOList = new ArrayList<>();
        for (FreeCarryModeDO freeCarryModeDO : freeCarryModeDOList) {
            freeCarryModeVOList.add(FreeCarryModeDtoMapper.INSTANCE.do2VO(freeCarryModeDO));
        }

        return freeCarryModeVOList;
    }
}
